﻿namespace KLF.Lib.Browser.Events
{
    #region Using Statements

    using System;
    using KLF.Lib.Browser.DOM;
using KLF.Lib.Browser.DOM.HTML;

    #endregion

    /// <summary>
    /// This event fires just before the DocumentLoader executes a block of
    /// script.  An application may choose to stop or modify the script 
    /// before it executes by listening for the OnExecuteScriptElement event
    /// in the browser object.
    /// </summary>
    public sealed class ScriptPreExecuteArgs : ScriptEventArgs
    {
        public ScriptPreExecuteArgs(HTMLDocument _doc, HTMLScriptElement _script)
            : base(_doc, _script)
        {
            ExecuteScript = true;
        }

        /// <summary>
        /// A flag that indicates that execution of said script 
        /// should not happen.
        /// </summary>
        public bool ExecuteScript { get; set; }
    }
}
